package com.jt.service;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;
@Aspect
@Component
public class AspectTest {
    @Pointcut("execution(* com.jt.service..*.*(..))")
    public void point(){}
   @Around("point()")
   public Object doAround(ProceedingJoinPoint joinPoint) throws  Throwable {
        long start =System.currentTimeMillis();
       Object o =joinPoint.proceed();
       long end =System.currentTimeMillis();
       System.out.println("aop计时器"+(end-start));
    return o;
    }
}
